org.eclipse.vtp.framework.engine
Class DataTypeDescriptor

java.lang.Object
  extended by org.eclipse.vtp.framework.engine.DataTypeDescriptor

public final class DataTypeDescriptor
extends java.lang.Object

An object that describes a dynamic data type.

Author:
Lonnie Pryor

Constructor Summary
DataTypeDescriptor(java.lang.String name, FieldDescriptor[] fields)
          Creates a new DataTypeDescriptor.
 
Method Summary
 FieldDescriptor getField(int index)
          Returns the field at the specified index.
 int getFieldCount()
          Returns the number of fields declared on this type.
 java.lang.String getName()
          Returns the name of this type.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataTypeDescriptor

public DataTypeDescriptor(java.lang.String name,
                          FieldDescriptor[] fields)
Creates a new DataTypeDescriptor.

Parameters:
name - The name of this type.
fields - The fields declared in this type.
Throws:
java.lang.IllegalArgumentException - If the supplied name is empty.
java.lang.IllegalArgumentException - If the same field name is listed more than once in the supplied field array.
java.lang.NullPointerException - If the supplied name is null.
java.lang.NullPointerException - If the supplied field array or any of its elements are null.
Method Detail

getName

public java.lang.String getName()
Returns the name of this type.

Returns:
The name of this type.

getFieldCount

public int getFieldCount()
Returns the number of fields declared on this type.

Returns:
The number of fields declared on this type.

getField

public FieldDescriptor getField(int index)
                         throws java.lang.IndexOutOfBoundsException
Returns the field at the specified index.

Returns:
The field at the specified index.
Throws:
java.lang.IndexOutOfBoundsException - If the supplied index is less than zero or greater than or equal to this type's field count.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object